﻿using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.UI.Xaml.Controls;
using WinUITest.Enums;

namespace WinUITest.Pages
{
    [Menu("附加属性")]
    public sealed partial class AttachedPropertyPage : Page
    {
        public AttachedPropertyViewModel ViewModel { get; } = new();
        public AttachedPropertyPage() => InitializeComponent();
    }
    public partial class AttachedPropertyViewModel : ObservableObject
    {
        [ObservableProperty]
        public partial TestEnum? SelectedValue { get; set; } = TestEnum.Value2;
        //public Type SelectedNullValueType { get; } = typeof(TestEnum?);
        //[ObservableProperty]
        //private TestEnum? _selectedNullValue = null;
        //[ObservableProperty]
        //private TestEnum? _selectedNullValue2 = null;
    }
}
